package com.jumei.flume.processor.rules;

import com.jumei.flume.bo.SensorMessage;
import com.jumei.flume.processor.ProcessorContext;

public abstract class TypeResolver2 {
	
	public abstract Type resolve(SensorMessage record, ProcessorContext context);
	public abstract boolean filter(SensorMessage record, ProcessorContext context);
	
	
	/**
	 * 决定规则优先级
	 * 
	 * @return
	 */
	public boolean isPrevious() {
		return Boolean.FALSE;
	}
	
	public boolean isLast() {
		return Boolean.FALSE;
	}
	/**
	 * 排序使用:
	 * 
	 * 负数最高
	 * 整数越低
	 * 
	 * @return
	 */
	public int rank() {
		return 0;
	}
	
//	public boolean filter(SensorMessage record, ProcessorContext context) {
//		return Boolean.TRUE;
//	}
	
//	public boolean filterUrl(SensorMessage record, ProcessorContext context) {
//		return Boolean.TRUE;
//	}
//	
//	public boolean filterReferrer(SensorMessage record, ProcessorContext context) {
//		return Boolean.TRUE;
//	}
}
